<?php

/**
 * 作者：lucas
 * 链接：
 * 邮箱：dissipator_520@qq.com
 */

/**
 * FhfxAction
 *
 * @author lucas
 */
class FhfxAction extends BaseAction {

    public function index() {

        $this->display();
    }

     public function getFYChartsdata() {

        $map=$this->condition;
        $Mode = D('FhView');
        $data = $Mode->getFYdata();

        // $datas= $Mode->getTCdata();
        // foreach ($datas as $value) {
        //     $data[]=$value;
        // }
        // p($data);
        $data['o']=array(
                    'xformatter'=>'年',
                    'yformatter'=>'万只',
                    'type'=>'bar'
            );
        // p($data);
        $this->getECharts($data);

    }

     public function getFMChartsdata() {

        $map=$this->condition;
        $Mode = D('FhView');
        $data = $Mode->getMCdata();

        // $datas= $Mode->getTCdata();
        // foreach ($datas as $value) {
        //     $data[]=$value;
        // }
        // p($data);
        $data['o']=array(
                    'xformatter'=>'',
                    'yformatter'=>'万只',
                    'type'=>'line'
            );
        // p($data);
        $this->getECharts($data);

    }

     public function getEChartsdata() {

        $map=$this->condition;
        $Mode = D('FhView');
        $data = $Mode->getECdata();

        // $datas= $Mode->getTCdata();
        // foreach ($datas as $value) {
        //     $data[]=$value;
        // }
        // p($data);
        $data['o']=array(
                    'xformatter'=>'月',
                    'yformatter'=>'万只',
                    'type'=>'bar'
            );
        // p($data);
        $this->getECharts($data);

    }

    public function getECPdata() {

        $map=$this->condition;
        $Mode = D('FhView');
        $data = $Mode->getECPdata();
        $data['o']=array(
                    'xformatter'=>'月',
                    'yformatter'=>'箱',
                    'type'=>'line'
            );
        // p($data);
        $this->getECharts($data);

    }

    public function getECFdata() {

        $map=$this->condition;
        $Mode = D('FhView');
        $data = $Mode->getECFdata();
        $data['o']=array(
                    'xformatter'=>'月',
                    'yformatter'=>'万只',
                    'type'=>'line'
            );
        // p($data);
        $this->getECharts($data);

    }

    public function A3orderbill() {


        $Mode = D('A3');
        $data = $Mode->orderbillq();

        $data['o']=array(
                    'xformatter'=>'月',
                    'yformatter'=>'万美元',
                    'type'=>'bar'
            );
        foreach ($data as $key => $value) {
            $data[$key]['data']=$value['data']/10000;
        }
        // p($data);
        // die();
        $this->getECharts($data);

    }

    public function A3orderbillv() {


        $Mode = D('A3');
        $data = $Mode->orderbillq();

        $data['o']=array(
                    'xformatter'=>'月',
                    'yformatter'=>'万美元',
                    'type'=>'bar'
            );
        foreach ($data as $key => $value) {
            $data[$key]['data']=$value['data']/10000;
        }
        // p($data);
        // die();
        $this->getECharts($data);

    }

}

?>
